import { Request, Controller, Get, Req, UseGuards } from '@nestjs/common';
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
import { JwtAuthGuard } from 'src/auth/jwt-auth.guard';
import { Roles } from '../roles/roles.decorator';
@Controller('user')
@ApiTags('用户模块')
@ApiBearerAuth('jwt')
@UseGuards(JwtAuthGuard)
export class UserController {
  @Get('test')
  @Roles('admin')
  test233(@Req() request: Request) {
    console.log(request['user']);
    return 'test';
  }
}
